package com.sqx.modules.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@TableName(value = "tb_order")
public class TbOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)

    @ApiModelProperty("order_id")
    private Long orderId;


    @ApiModelProperty("优惠券id")
    @TableField(value = "coupon_id")
    private Long couponId;


    @ApiModelProperty("用户id")
    private Long userId;


    @ApiModelProperty("用户名")
    private String userName;


    @ApiModelProperty("手机号")
    private String phone;


    @ApiModelProperty("地址id")
    private Long addressId;


    @ApiModelProperty("地址信息")
    private String address;


    @ApiModelProperty("订单号")
    private String orderNumber;


    @ApiModelProperty("是否支付 0未支付 1已支付")
    private Integer isPay;


    @ApiModelProperty("下单时间")
    private String createTime;

    @ApiModelProperty("最后一次修改订单状态时间")
    private String updateTime;


    @ApiModelProperty("支付时间")
    private String payTime;


    @ApiModelProperty("支付方式  1微信支付  2余额支付  3支付宝支付")
    private Integer payType;


    @ApiModelProperty("取餐号码")
    private String orderCode;


    @ApiModelProperty("订单类型 1上门 2外卖")
    private Integer orderType;


    @ApiModelProperty("订单父id")
    private Long parentId;


    @ApiModelProperty("打包费")
    private BigDecimal packMoney;


    @ApiModelProperty("跑腿费")
    private BigDecimal errandMoney;


    @ApiModelProperty("订单状态 0待结算 1待支付 2直接购买（未支付） 7商家待接单 8商家拒绝接单 6制作中  3待取餐/派送中 4已完成 5已取消")
    private Integer status;


    @ApiModelProperty("是否开启自动派单 0开启 1关闭")
    private Integer autoSendOrder;


    @ApiModelProperty("是否删除该订单 0未删除 1删除")
    private Integer deleteFlag;

    @ApiModelProperty("支付金额")
    private BigDecimal payMoney;

    @ApiModelProperty("创建拼单人id")
    private Long parentUserId;

    @ApiModelProperty("商铺id")
    private Long shopId;

    @ApiModelProperty("最后一次添加购物车的时间")
    private String addGoodsTime;

    @ApiModelProperty("商家接单时间")
    private String shopReceivingTime;

    @ApiModelProperty("商家本单收入")
    private BigDecimal shopIncomeMoney;

    @ApiModelProperty("商家拒绝接单理由")
    private String shopRefuseToOrder;

    @ApiModelProperty("用户是否已经评论该订单 0未评论 1已评论")
    private Integer commentFlag;

    @ApiModelProperty("订单备注")
    private String remark;

    @ApiModelProperty("商铺名")
    @TableField(exist = false)
    private String shopName;

    @ApiModelProperty("商铺封面图")
    @TableField(exist = false)
    private String shopCover;

    @ApiModelProperty("商铺详细地址")
    @TableField(exist = false)
    private String detailedAddress;

    @ApiModelProperty("商铺配送距离")
    @TableField(exist = false)
    private String distributionDistance;

    @ApiModelProperty("商铺经度")
    @TableField(exist = false)
    private String shopLng;

    @ApiModelProperty("商铺维度")
    @TableField(exist = false)
    private String shopLat;

    @ApiModelProperty("商铺电话")
    @TableField(exist = false)
    private String shopPhone;

    @TableField(exist = false)
    private List<OrderGoods> orderGoodsList;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private Integer countOrder;

    @TableField(exist = false)
    private BigDecimal skuPrice;

    @TableField(exist = false)
    private BigDecimal couponMoney;

    @TableField(exist = false)
    private String classifyName;

    @TableField(exist = false)
    private Integer Rank;

    @TableField(exist = false)
    private BigDecimal shopMoney;

    @TableField(exist = false)
    private Long indentId;

    @TableField(exist = false)
    private String indentNumber;

    @TableField(exist = false)
    private Long riderUserId;

    @TableField(exist = false)
    private String riderNickName;

    @TableField(exist = false)
    private String riderAvatar;

    @TableField(exist = false)
    private String riderPhone;

    @TableField(exist = false)
    private BigDecimal exemptMinMoney;

    @TableField(exist = false)
    private BigDecimal minimumDelivery;

    @TableField(exist = false)
    @ApiModelProperty("评价内容")
    private String evaluateMessage;

    @TableField(exist = false)
    @ApiModelProperty("评价内容")
    private String shopReplyMessage;

    @TableField(exist = false)
    @ApiModelProperty("评分")
    private Double score;

    @TableField(exist = false)
    @ApiModelProperty("评论时间")
    private String eCreateTime;

    @TableField(exist = false)
    @ApiModelProperty("用户昵称")
    private String userNickName;

    public TbOrder() {}
}
